package suanfa;


import util.Print;
import util.Swap;

import java.util.Arrays;

/*冒泡排序*/
public class Bubbing {

    public static void main(String[] args) {
        int[] arr = {5,4,7,9,2,1,6,4,8,10};
        sort(arr);
    }

    public static void sort(int[] arr) {
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = i+1; j < arr.length; j++) {
                if (arr[i] > arr[j]) Swap.swap(arr, i, j);
            }
        }
    }
}
